package cn.edu.zafu.bigdata.lmr;

class Animal {
        public void makeSound() {
            System.out.println("Animal sound");
        }
    }
    class Dog extends Animal {
        public void makeSound() {
            System.out.println("Woof!");
        }
    }
    class Cat extends Animal {
        public void makeSound() {
            System.out.println("Meow!");
        }
    }

    public class Test1 {
        public static void main(String[] args) {
            Dog dog = new Dog();
            Cat cat = new Cat();

            dog.makeSound();
            cat.makeSound();
        }
    }
